package com.trip.driver.controller;


import com.trip.common.po.CarInfo;
import com.trip.common.vo.Result;
import com.trip.driver.service.impl.CarInfoServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author hr
 * @since 2024-09-05
 */
@RestController
@RequestMapping("/carInfo")
public class CarInfoController {

    @Autowired
    private CarInfoServiceImpl carInfoService;

    @RequestMapping("/regCarInfo")
    public Result regCarInfo(@RequestBody CarInfo carInfo){
        return carInfoService.regCarInfo(carInfo);
    }

    @RequestMapping("/getCarInfoByDriver")
    public Result getCarInfoByDriver(@RequestBody  String driver_id){
        System.out.println(driver_id);
        return carInfoService.getCarInfoByDriver(driver_id);
    }
}

